home *** CD-ROM | disk | FTP | other *** search
- property mySprite, answered, attempts
-
- on beginSprite me
- global response, textresponse, prompts
- mySprite = me.spriteNum
- sprite(mySprite).locH = 320
- sprite(mySprite).locV = 240
- sprite(mySprite).cursor = 280
- member("answer1").text = EMPTY
- member("answer2").text = EMPTY
- response = 0
- textresponse = 0
- prompts = 0
- answered = 0
- attempts = 0
- end
-
- on mouseDown me
- sprite(mySprite).member = 3
- sprite(mySprite).locH = 320
- sprite(mySprite).locV = 240
- end
-
- on mouseEnter me
- sprite(mySprite).member = 2
- sprite(mySprite).locH = 320
- sprite(mySprite).locV = 240
- end
-
- on mouseUp me
- global ganswered
- sprite(mySprite).member = 4
- sprite(mySprite).locH = 320
- sprite(mySprite).locV = 240
- if answered = 1 then
- ganswered = ganswered + 1
- submitanswer2()
- else
- if attempts = 2 then
- ganswered = ganswered + 1
- submitanswer2()
- else
- if attempts = 0 then
- checkanswers()
- submitanswer()
- else
- submitanswer()
- end if
- end if
- end if
- end
-
- on mouseLeave me
- sprite(mySprite).member = 4
- sprite(mySprite).locH = 320
- sprite(mySprite).locV = 240
- end
-
- on submitanswer
- global scorez, response, textresponse
- if (member("answer1").text = "picture") and (member("answer2").text = "secret") then
- response = 1
- textresponse = 1
- answered = 1
- attempts = 1
- scorez = scorez + 1
- else
- response = 2
- textresponse = 2
- attempts = attempts + 1
- end if
- end
-
- on submitanswer2
- global whichframenow
- go(whichframenow)
- end
-
- on checkanswers
- if member("answer1").text = "picture" then
- member("answer1").text = "picture"
- else
- member("answer1").text = EMPTY
- end if
- if member("answer2").text = "secret" then
- member("answer2").text = "secret"
- else
- member("answer2").text = EMPTY
- end if
- end
-
- on exitFrame
- global ganswered, response, textresponse, prompts
- if answered = 1 then
- if ganswered = 2 then
- textresponse = 4
- prompts = 3
- member("answer1").editable = 0
- member("answer2").editable = 0
- else
- prompts = 1
- response = 1
- member("answer1").editable = 0
- member("answer2").editable = 0
- end if
- else
- if attempts = 1 then
- prompts = 2
- else
- if attempts = 2 then
- if ganswered = 2 then
- textresponse = 4
- response = 3
- prompts = 3
- member("answer1").editable = 0
- member("answer2").editable = 0
- sprite(3).locH = -500
- sprite(5).locH = -500
- sprite(6).locH = -500
- sprite(8).locH = -500
- sprite(9).locH = -500
- else
- textresponse = 3
- prompts = 1
- sprite(3).locH = -500
- sprite(5).locH = -500
- sprite(6).locH = -500
- sprite(8).locH = -500
- sprite(9).locH = -500
- member("answer1").editable = 0
- member("answer2").editable = 0
- end if
- end if
- end if
- end if
- end
-